import os
from dotenv import load_dotenv

# 加载环境变量
load_dotenv()

# 摄像头配置
CAMERA_IP = os.getenv('CAMERA_IP', '192.168.1.100')
CAMERA_USERNAME = os.getenv('CAMERA_USERNAME', 'admin')
CAMERA_PASSWORD = os.getenv('CAMERA_PASSWORD', '12345')

# 人脸识别配置
FACE_DETECTION_CONFIDENCE = 0.8
FACE_RECOGNITION_THRESHOLD = 0.6
KNOWN_FACES_DIR = 'data/known_faces'

# 火灾检测配置
FIRE_DETECTION_CONFIDENCE = 0.7
FIRE_DETECTION_MODEL_PATH = 'models/fire_detection.pth'

# 报警配置
ALERT_COOLDOWN = 60  # 报警冷却时间（秒）
ALERT_LOG_FILE = 'logs/alerts.log'

# 电话预警配置
PHONE_ALERT_ENABLED = True
PHONE_NUMBERS = os.getenv('ALERT_PHONE_NUMBERS', '').split(',')  # 多个号码用逗号分隔
ALIYUN_ACCESS_KEY = os.getenv('ALIYUN_ACCESS_KEY', '')
ALIYUN_ACCESS_SECRET = os.getenv('ALIYUN_ACCESS_SECRET', '')
ALIYUN_CALLING_NUMBER = os.getenv('ALIYUN_CALLING_NUMBER', '')  # 阿里云语音通知主叫号码